bitkeeper revision 1.1218 (4214eb5c50HeO5ayekYo8U0171lEmA)
authordjm@kirby.fc.hp.com <djm@kirby.fc.hp.com>
Thu, 17 Feb 2005 19:07:08 +0000 (19:07 +0000)
committerdjm@kirby.fc.hp.com <djm@kirby.fc.hp.com>
Thu, 17 Feb 2005 19:07:08 +0000 (19:07 +0000)
mkbuildtree, setup.c:
  update to match serial changes in common
serial.h:
  new file

.rootkeys
xen/arch/ia64/patch/linux-2.6.7/setup.c
xen/arch/ia64/tools/mkbuildtree
xen/include/asm-ia64/serial.h [new file with mode: 0644]

index 37ed52e46b7a4cfcaa0591271c7b9da3e3872766..e06a73ac3c00452e6272048830c30a1dcd62b580 100644 (file)
--- a/.rootkeys
+++ b/.rootkeys
 421098b72bPUyviWloEAIB85dGCm2Q xen/include/asm-ia64/privop.h
 421098b7Z6OwjZnrTZkh34DoDfcjrA xen/include/asm-ia64/regionreg.h
 421098b707cY5YluUcWK5Pc-71ETVw xen/include/asm-ia64/regs.h
+4214e2f3fbO_n9Z1kIcBR83d7W4OJw xen/include/asm-ia64/serial.h
 421098b7czhvyPGFa5nskL0N4vNvFw xen/include/asm-ia64/shadow.h
 421098b7GkWOnlzSmPvNAhByOSZ1Dw xen/include/asm-ia64/time.h
 421098b7FK3xgShpnH0I0Ou3O4fJ2Q xen/include/asm-ia64/tlb.h
index c75ebf8df20a46cca4e0d4390e0124fbcef62660..05de3112ee0a75ca4172997ca38c295fabefe7f9 100644 (file)
@@ -1,5 +1,5 @@
---- /home/djm/src/xen/xeno-ia64.bk/xen/linux-2.6.7/arch/ia64/kernel/setup.c    2004-06-15 23:18:58.000000000 -0600
-+++ /home/djm/src/xen/xeno-ia64.bk/xen/arch/ia64/setup.c       2004-11-11 17:08:30.000000000 -0700
+--- /home/djm/linux-2.6.7/arch/ia64/kernel/setup.c     2004-06-15 23:18:58.000000000 -0600
++++ arch/ia64/setup.c  2005-02-17 10:53:00.000000000 -0700
 @@ -21,6 +21,9 @@
  #include <linux/init.h>
  
  /*
   * Filter incoming memory segments based on the primitive map created from the boot
   * parameters. Segments contained in the map are removed from the memory ranges. A
-@@ -285,7 +298,9 @@
+@@ -280,23 +293,40 @@
+ }
+ #endif
++#ifdef XEN
++void __init
++early_setup_arch(void)
++{
++      efi_init();
++      io_port_init();
++}
++#endif
++
+ void __init
+ setup_arch (char **cmdline_p)
  {
        unw_init();
  
  
        *cmdline_p = __va(ia64_boot_param->command_line);
        strlcpy(saved_command_line, *cmdline_p, sizeof(saved_command_line));
-@@ -297,6 +312,10 @@
++#ifndef XEN
+       efi_init();
+       io_port_init();
++#endif
+ #ifdef CONFIG_IA64_GENERIC
        machvec_init(acpi_get_sysname());
  #endif
  
@@ -79,7 +99,7 @@
  #ifdef CONFIG_ACPI_BOOT
        /* Initialize the ACPI boot-time table parser */
        acpi_table_init();
-@@ -413,6 +432,9 @@
+@@ -413,6 +443,9 @@
                sprintf(cp, " 0x%lx", mask);
        }
  
        seq_printf(m,
                   "processor  : %d\n"
                   "vendor     : %s\n"
-@@ -667,6 +689,8 @@
+@@ -667,6 +700,8 @@
  void
  check_bugs (void)
  {
index 98f49a27f452bf213f7a751c6684a20821515daf..883dd91b8a0aed7356ffd0406eeec2bebe16fb01 100644 (file)
@@ -226,7 +226,6 @@ softlink include/asm-ia64/rwsem.h include/asm-ia64/rwsem.h
 softlink include/asm-ia64/scatterlist.h include/asm-ia64/scatterlist.h
 softlink include/asm-ia64/sections.h include/asm-ia64/sections.h
 softlink include/asm-ia64/semaphore.h include/asm-ia64/semaphore.h
-softlink include/asm-ia64/serial.h include/asm-ia64/serial.h
 softlink include/asm-ia64/sigcontext.h include/asm-ia64/sigcontext.h
 softlink include/asm-ia64/signal.h include/asm-ia64/signal.h
 softlink include/asm-ia64/smp.h include/asm-ia64/smp.h
@@ -241,6 +240,10 @@ softlink include/asm-ia64/unistd.h include/asm-ia64/unistd.h
 softlink include/asm-ia64/unwind.h include/asm-ia64/unwind.h
 softlink include/asm-ia64/ustack.h include/asm-ia64/ustack.h
 
+#rename this one because xen/include/asm/serial.h already exists
+#there is only one use of it that must be patched -- arch/ia64/setup.c 
+#softlink include/asm-ia64/serial.h include/asm-ia64/asmserial.h
+
 # xen/include/asm-ia64/linux/*.h (== linux/include/linux/*.h)
 
 cp_patch include/linux/bootmem.h include/asm-ia64/linux/bootmem.h bootmem.h
diff --git a/xen/include/asm-ia64/serial.h b/xen/include/asm-ia64/serial.h
new file mode 100644 (file)
index 0000000..7011963
--- /dev/null
@@ -0,0 +1,91 @@
+#ifndef __ASM_SERIAL_H__
+#define __ASM_SERIAL_H__
+
+#include <asm/regs.h>
+#include <asm/irq.h>
+#include <xen/serial.h>
+#include <asm/hpsim_ssc.h>
+
+#if 1
+#define arch_serial_putc(_uart, _c)                                    \
+       ( platform_is_hp_ski() ? (ia64_ssc(c,0,0,0,SSC_PUTCHAR), 1) :   \
+       ( longs_peak_putc(c), 1 ))
+#else
+#define arch_serial_putc(_uart, _c)                                    \
+       ( platform_is_hp_ski() ? (ia64_ssc(c,0,0,0,SSC_PUTCHAR), 1) :   \
+       ( (inb((_uart)->io_base + LSR) & LSR_THRE) ?                    \
+       (outb((_c), (_uart)->io_base + THR), 1) : 0 ))
+#endif
+
+
+#define OPT_COM1_STR "115200"
+#define OPT_COM2_STR ""
+
+/* Register offsets */
+#define RBR             0x00    /* receive buffer       */
+#define THR             0x00    /* transmit holding     */
+#define IER             0x01    /* interrupt enable     */
+#define IIR             0x02    /* interrupt identity   */
+#define FCR             0x02    /* FIFO control         */
+#define LCR             0x03    /* line control         */
+#define MCR             0x04    /* Modem control        */
+#define LSR             0x05    /* line status          */
+#define MSR             0x06    /* Modem status         */
+#define DLL             0x00    /* divisor latch (ls) (DLAB=1) */
+#define DLM             0x01    /* divisor latch (ms) (DLAB=1) */
+
+/* Interrupt Enable Register */
+#define IER_ERDAI       0x01    /* rx data recv'd       */
+#define IER_ETHREI      0x02    /* tx reg. empty        */
+#define IER_ELSI        0x04    /* rx line status       */
+#define IER_EMSI        0x08    /* MODEM status         */
+
+/* FIFO control register */
+#define FCR_ENABLE      0x01    /* enable FIFO          */
+#define FCR_CLRX        0x02    /* clear Rx FIFO        */
+#define FCR_CLTX        0x04    /* clear Tx FIFO        */
+#define FCR_DMA         0x10    /* enter DMA mode       */
+#define FCR_TRG1        0x00    /* Rx FIFO trig lev 1   */
+#define FCR_TRG4        0x40    /* Rx FIFO trig lev 4   */
+#define FCR_TRG8        0x80    /* Rx FIFO trig lev 8   */
+#define FCR_TRG14       0xc0    /* Rx FIFO trig lev 14  */
+
+/* Line control register */
+#define LCR_DLAB        0x80    /* Divisor Latch Access */
+
+/* Modem Control Register */
+#define MCR_DTR         0x01    /* Data Terminal Ready  */
+#define MCR_RTS         0x02    /* Request to Send      */
+#define MCR_OUT2        0x08    /* OUT2: interrupt mask */
+
+/* Line Status Register */
+#define LSR_DR          0x01    /* Data ready           */
+#define LSR_OE          0x02    /* Overrun              */
+#define LSR_PE          0x04    /* Parity error         */
+#define LSR_FE          0x08    /* Framing error        */
+#define LSR_BI          0x10    /* Break                */
+#define LSR_THRE        0x20    /* Xmit hold reg empty  */
+#define LSR_TEMT        0x40    /* Xmitter empty        */
+#define LSR_ERR         0x80    /* Error                */
+
+/* These parity settings can be ORed directly into the LCR. */
+#define PARITY_NONE     (0<<3)
+#define PARITY_ODD      (1<<3)
+#define PARITY_EVEN     (3<<3)
+#define PARITY_MARK     (5<<3)
+#define PARITY_SPACE    (7<<3)
+
+#define RXBUFSZ 32
+#define MASK_RXBUF_IDX(_i) ((_i)&(RXBUFSZ-1))
+
+#define UART_ENABLED(_u) ((_u)->baud != 0)
+#define DISABLE_UART(_u) ((_u)->baud = 0)
+
+/* 'Serial handles' are comprise the following fields. */
+#define SERHND_IDX      (1<<0) /* COM1 or COM2?                           */
+
+unsigned char irq_serial_getc(int handle);
+
+void serial_force_unlock(int handle);
+
+#endif /* __ASM_SERIAL_H__ */